package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class HelloServiceImpl implements HelloService {

    @Override
    public String methodA() {
        try {
            Thread.sleep((long)(Math.random() * 100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "hello method A";
    }

    @Override
    public String methodB() {
        try {
            Thread.sleep((long)(Math.random() * 100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "hello method B";
    }

    @Override
    public String methodC() {
        try {
            Thread.sleep((long)(Math.random() * 100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "hello method C";
    }

    public static void main(String[] args) {
        System.out.println((long)(Math.random() * 100));
    }
}
